#ifndef prefix_76dec69a7d376b6ed16a945857cb93ae
#define prefix_76dec69a7d376b6ed16a945857cb93ae

#include "aux.h"
#include "base.h"

using namespace std;

class Prefix {
    friend class AsnPrefix;

    private:
        uint32_t ip;
        uint8_t netmask;

    public:
        Prefix();
        Prefix(uint32_t _ip, uint8_t _netmask); 

        ~Prefix(); 
        uint32_t getIP(); 
        uint8_t  getNetmask(); 
        int      getBit(uint32_t nbit); 

        bool operator<( Prefix rhs ) const; 
        Prefix operator=( Prefix rhs ); 
        bool operator==( Prefix rhs ) const; 

        string str() const; 
};


#endif // EOF

